package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysApplyMapper;
import com.ruoyi.project.system.domain.SysApply;
import com.ruoyi.project.system.service.ISysApplyService;

/**
 * 入驻申请Service业务层处理
 * 
 * @author jjp
 * @date 2020-04-24
 */
@Service
public class SysApplyServiceImpl implements ISysApplyService 
{
    @Autowired
    private SysApplyMapper sysApplyMapper;

    /**
     * 查询入驻申请
     * 
     * @param applyId 入驻申请ID
     * @return 入驻申请
     */
    @Override
    public SysApply selectSysApplyById(Long applyId)
    {
        return sysApplyMapper.selectSysApplyById(applyId);
    }

    @Override
    public List<SysApply> queryApplyList(SysApply sysApply) {
        return sysApplyMapper.queryApplyList(sysApply);
    }

    /**
     * 查询入驻申请列表
     * 
     * @param sysApply 入驻申请
     * @return 入驻申请
     */
    @Override
    public List<SysApply> selectSysApplyList(SysApply sysApply)
    {
        return sysApplyMapper.selectSysApplyList(sysApply);
    }

    /**
     * 新增入驻申请
     * 
     * @param sysApply 入驻申请
     * @return 结果
     */
    @Override
    public int insertSysApply(SysApply sysApply)
    {
        sysApply.setCreateTime(DateUtils.getNowDate());
        return sysApplyMapper.insertSysApply(sysApply);
    }

    /**
     * 修改入驻申请
     * 
     * @param sysApply 入驻申请
     * @return 结果
     */
    @Override
    public int updateSysApply(SysApply sysApply)
    {
        sysApply.setUpdateTime(DateUtils.getNowDate());
        return sysApplyMapper.updateSysApply(sysApply);
    }

    /**
     * 批量删除入驻申请
     * 
     * @param applyIds 需要删除的入驻申请ID
     * @return 结果
     */
    @Override
    public int deleteSysApplyByIds(Long[] applyIds)
    {
        return sysApplyMapper.deleteSysApplyByIds(applyIds);
    }

    /**
     * 删除入驻申请信息
     * 
     * @param applyId 入驻申请ID
     * @return 结果
     */
    @Override
    public int deleteSysApplyById(Long applyId)
    {
        return sysApplyMapper.deleteSysApplyById(applyId);
    }
}
